cmake_minimum_required(VERSION 3.0.0)
project(exec-sample VERSION 0.1.0)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

# find_package(OpenCV REQUIRED)

set(MOINFERENCE ${CMAKE_CURRENT_LIST_DIR}/../install)


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fPIC -O3 -std=c++11 -lpthread -fopenmp -lrt -ldl -pthread -lm")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fPIC -O3 -std=c99 -fopenmp -ldl")


include_directories(
        ${MOINFERENCE}/include/onnxruntime
)

link_directories(
        ${MOINFERENCE}/lib
)

add_executable(${PROJECT_NAME} main.cc)
set(LINK_LIB
    -Wl,-no-whole-archive libmonolith_inference.a -Wl,-no-whole-archive
    dl)

target_link_libraries(${PROJECT_NAME} ${LINK_LIB} ${OpenCV_LIBS})

